package com.ruoyi.merchant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 提现状态枚举
 */
@Getter
@AllArgsConstructor
public enum WithdrawalStatusEnum {
    
    APPLYING(1, "申请中"),
    PROCESSING(2, "处理中"),
    SUCCESS(3, "成功"),
    FAILED(4, "失败");
    
    private final Integer code;
    private final String desc;
    
    public static String getDescByCode(Integer code) {
        if (code == null) {
            return "";
        }
        for (WithdrawalStatusEnum status : values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return "";
    }
}
